pkgname=gtk2-aqd
pkgver=2.12.1
pkgrel=1
pkgdesc="The GTK+ Toolkit (v2), with mac-style menubar"
arch=(i686 x86_64)
url="http://www.gtk.org/"
install=gtk2.install
depends=('atk>=1.18.0-2' 'pango>=1.16.5' 'glib2>=2.14.0-3' 'libxcursor' 'libxinerama' 'libxrandr>=1.2.1' 'libxi' 'libcups')
makedepends=(pkgconfig)
provides=(gtk2)
conflicts=(gtk2)
options=(NOLIBTOOL)
backup=(etc/gtk-2.0/gtkrc)
license=(LGPL)
source=(http://www.tux.org/pub/packages/x/gtk/2.12/gtk+-$pkgver.tar.gz \
gdkscreen-check.patch \
gtkclipboard-check.patch \
gtkmenubar.patch)
md5sums=('b0cd0b8067d3a83b05764480f73f9306'
'e223e58ffde3706b0d82641aaf1db273'
'4025d3c15d6c6f73a032f403ffd4ff1c'
'9fc66b3f4526b0b8ed2cddcd7a72bb59')

build() {
	cd ${startdir}/src/gtk+-${pkgver}
	patch -p0 < ../gtkmenubar.patch || return 1
	patch -Np1 -i ../gdkscreen-check.patch || return 1
	patch -Np1 -i ../gtkclipboard-check.patch || return 1
	./configure --prefix=/usr --sysconfdir=/etc \
	--localstatedir=/var --with-xinput=yes \
	--with-included-loaders=yes \
	--disable-dependency-tracking
	make || return 1
	make DESTDIR=${startdir}/pkg install

	mkdir -p ${startdir}/pkg/etc/gtk-2.0
	echo 'gtk-fallback-icon-theme = "gnome"' > ${startdir}/pkg/etc/gtk-2.0/gtkrc
}
